#include "deviceCodeMessageHandler.h"
#include "deviceCodeMessage.h"
#include "deviceCode.h"
#include "deviceCodeResMessage.h"
#include "stringUtils.h"

void DeviceCodeMessageHandler::handle(MtpMessage* message, const IPaddress& attachment)
{
	const Char* dc = DeviceCode::inst().getDeviceCode();
	DeviceCodeResMessage msg(dc, message);
	msg.send(attachment);
}

MtpMessage* DeviceCodeMessageHandler::decode(MtpProtocol* packet, const IPaddress& attachment)
{
	return new DeviceCodeMessage(packet);
}
